package com.acminds.fotoporter.persistence.entities;

// Generated Jan 14, 2012 10:31:36 AM by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acminds.fotoporter.persistence.dto.*;

/**
 * OrderRequest generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractOrderRequest extends
		com.acminds.fotoporter.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer orderRequestId;
	private UserInfo userInfo;
	private Location location;
	private String userComment;
	private int orderStatus;
	private String orderNumber;
	private Date orderDate;
	private BigDecimal totalPrice;
	private List<ItemOrdered> itemOrdereds = new ArrayList<ItemOrdered>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ORDER_REQUEST_ID", unique = true, nullable = false)
	public Integer getOrderRequestId() {
		return this.orderRequestId;
	}

	public void setOrderRequestId(Integer orderRequestId) {
		this.orderRequestId = orderRequestId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_INFO_ID", nullable = false)
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LOCATION_ID", nullable = false)
	public Location getLocation() {
		return this.location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	@Column(name = "USER_COMMENT", length = 100)
	public String getUserComment() {
		return this.userComment;
	}

	public void setUserComment(String userComment) {
		this.userComment = userComment;
	}

	@Column(name = "ORDER_STATUS", nullable = false)
	public int getOrderStatus() {
		return this.orderStatus;
	}

	public void setOrderStatus(int orderStatus) {
		this.orderStatus = orderStatus;
	}

	@Column(name = "ORDER_NUMBER", unique = true, nullable = false, length = 10)
	public String getOrderNumber() {
		return this.orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ORDER_DATE", nullable = false, length = 19)
	public Date getOrderDate() {
		return this.orderDate;
	}

	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}

	@Column(name = "TOTAL_PRICE", nullable = false, precision = 8)
	public BigDecimal getTotalPrice() {
		return this.totalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "orderRequest")
	public List<ItemOrdered> getItemOrdereds() {
		return this.itemOrdereds;
	}

	public void setItemOrdereds(List<ItemOrdered> itemOrdereds) {
		this.itemOrdereds = itemOrdereds;
	}

}
